﻿@using NetCoreCMS.Models;
@using NetCoreCMS.Common;
@{
    Layout = "~/Areas/admin/Views/Shared/_LayoutEdit.cshtml";
    ViewBag.Title = "编辑贵宾会员";
    Users m = ViewData["model"] as Users;
    List<SelectListItem> levelListItems = ViewData["levelListItems"] as List<SelectListItem>;
}

@section HeaderContent{
    <script>
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
        });
    </script>
}
<form id="form1" method="post" action="SubmitSave?action=@ViewBag.Action&id=@ViewBag.Id">
    <!--导航栏-->
    <div class="location">
        <a href="../user_list/index" class="back"><i class="iconfont icon-up"></i><span>返回列表页</span></a>
        <a href="../center/index"><i class="iconfont icon-home"></i><span>首页</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <a href="../finance_list/index"><span>会员管理</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>编辑会员</span>
        <div class="clipboard">
            <span><label id="clipMess"></label></span>
            <a href="javascript:;" class="copy" onclick="copy();"><i class="iconfont icon-copy"></i><span>复制</span></a>
            <a href="javascript:;" class="paste disable" onclick="paste();"><i class="iconfont icon-log"></i><span>粘贴</span></a>
        </div>
    </div>
    <div class="line10"></div>
    <!--/导航栏-->
    <!--内容-->
    <div id="floatHead" class="content-tab-wrap">
        <div class="content-tab">
            <div class="content-tab-ul-wrap">
                <ul>
                    <li><a class="selected" href="javascript:;">基本资料</a></li>
                    <li><a href="javascript:;">账户信息</a></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="tab-content">
        <dl>
            <dt>用户名</dt>
            <dd>
                    @Html.TextBox("txtUserName", m.user_name, new { @class = "input normal", @readonly = true, datatype = "*2-100", sucmsg = " " })

                <span class="Validform_checktip">*登录的用户名，支持中文</span>
            </dd>
        </dl>
        <dl>
            <dt>直推人</dt>
            <dd>
                @if (m.is_pass == 0)
                {
                    @Html.TextBox("txtDirect", (string)ViewBag.direct, new { @class = "input normal", datatype = "*2-100", sucmsg = " ", ajaxurl = "/submit_ajax/index?action=direct_validate" })
                }
                else
                {
                    @Html.TextBox("txtDirect", (string)ViewBag.direct, new { @class = "input normal",@readonly=true, datatype = "*2-100", sucmsg = " " })
                }
                <span class="Validform_checktip">*推荐人的用户名</span>
            </dd>
        </dl>
        <dl>
            <dt>接点人</dt>
            <dd>
                @if (m.is_pass == 0)
                {
                    @Html.TextBox("txtIndirect", (string)ViewBag.indirect, new { @class = "input normal", datatype = "*2-100", sucmsg = " ", ajaxurl = "/submit_ajax/index?action=indirect_validate" })
                }
                else
                {
                    @Html.TextBox("txtIndirect", (string)ViewBag.indirect, new { @class = "input normal",@readonly=true, datatype = "*2-100", sucmsg = " " })
                }
                <span class="Validform_checktip">*登录的用户名，支持中文</span>
            </dd>
        </dl>
        <dl>
            <dt>所属级别别</dt>
            <dd>
                <div class="rule-single-select">
                    @Html.DropDownList("ddlLevelId", new SelectList(levelListItems, "Value", "Text", m.level_id), new { datatype = "*", errormsg = "请选择级别", sucmsg = " " })
                </div>
            </dd>
        </dl>
        <dl>
            <dt>左区右区</dt>
            <dd>
                <div class="rule-multi-radio">
                    <span id="rplStatus">
                        @Html.RadioButton("rblLeftRight", 1, m.left_right == 1, new { id = "rblLeftRight_1" })<label for="rblStatus_1">左区</label>
                        @Html.RadioButton("rblLeftRight", 2, m.left_right == 2, new { id = "rblLeftRight_2" })<label for="rblStatus_2">右区</label>
                    </span>
                </div>
                <span class="Validform_checktip">*人为放区</span>
            </dd>
        </dl>
        <dl>
            <dt>奖金</dt>
            <dd>
                <div class="rule-multi-radio">
                    <span id="rplStatus">
                        @Html.RadioButton("rblJiangjin", 0, m.is_jiangjin == 0, new { id = "rblJiangjin_0" })<label for="rblStatus_0">停止</label>
                        @Html.RadioButton("rblJiangjin", 1, m.is_jiangjin == 1, new { id = "rblJiangjin_1" })<label for="rblStatus_1">正常</label>
                    </span>
                </div>
                <span class="Validform_checktip">*停止一切奖金</span>
            </dd>
        </dl>
        <dl>
            <dt>锁定</dt>
            <dd>
                <div class="rule-multi-radio">
                    <span id="rplStatus">
                        @Html.RadioButton("rblLock", 0, m.is_lock == 0, new { id = "rblLock_0" })<label for="rblStatus_0">正常</label>
                        @Html.RadioButton("rblLock", 1, m.is_lock == 1, new { id = "rblLock_1" })<label for="rblStatus_1">锁定</label>
                    </span>
                </div>
                <span class="Validform_checktip">*停止贵宾一切权力</span>
            </dd>
        </dl>
        <dl>
            <dt>分享</dt>
            <dd>
                <div class="rule-multi-radio">
                    <span id="rplStatus">
                        @Html.RadioButton("rblShare", 0, m.is_share == 0, new { id = "rblShare_0" })<label for="rblStatus_0">停止</label>
                        @Html.RadioButton("rblShare", 1, m.is_share == 1, new { id = "rblShare_1" })<label for="rblStatus_1">正常</label>
                    </span>
                </div>
                <span class="Validform_checktip">*停止贵宾分享</span>
            </dd>
        </dl>
        <dl>
            <dt>空点</dt>
            <dd>
                <div class="rule-multi-radio">
                    <span id="rplStatus">
                        @Html.RadioButton("rblKong", 0, m.is_kong == 0, new { id = "rblKong_0" })<label for="rblKong_0">实点</label>
                        @Html.RadioButton("rblKong", 1, m.is_kong == 1, new { id = "rblKong_1" })<label for="rblKong_1">空点</label>
                    </span>
                </div>
                <span class="Validform_checktip">*向上无奖金</span>
            </dd>
        </dl>
    </div>


    <div class="tab-content" style="display:none;">
        <dl>
            <dt>奖金金额</dt>
            <dd>
                @Html.TextBox("txtCashPoint", m.cash_point, new { @class = "input small", datatype ="*", sucmsg = " " }) 元
                <span class="Validform_checktip">*账户上的奖金</span>
            </dd>
        </dl>
        <dl>
            <dt>重消积分</dt>
            <dd>
                @Html.TextBox("txtShopPoint", m.shop_point, new { @class = "input small", datatype = "*", sucmsg = " " }) 分
                <span class="Validform_checktip">*重消</span>
            </dd>
        </dl>
        <dl>
            <dt>激活时间</dt>
            <dd>
                <label id="lblRegtime">@(m.id > 0 ? m.pass_time?.ToString("yyyy-MM-dd") : "")</label>
            </dd>
        </dl>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <input type="submit" class="btn" value="提交保存" />
            <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript: history.back(-1);" />
        </div>
    </div>
    <!--/工具栏-->

</form>